/* 
   Hex-Reinforced Design System
   Components
*/

/* --- PANELS --- */
.glass-panel {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px) saturate(180%);
    border: 1px solid var(--border-color);
}

.glass-panel-heavy {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--border-color);
}

/* --- COMMAND BAR --- */
.command-bar {
    height: 64px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

/* --- SEARCH BAR --- */
.omni-search {
    width: 400px;
    padding: 10px 24px;
    background: rgba(59, 130, 246, 0.3);
    /* Acts as visible border */
    border: none;
    color: white;
    font-family: var(--font-mono);
    font-size: 13px;
    position: relative;
    clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 50%,
            calc(100% - 15px) 100%, 15px 100%, 0 50%);
}

/* Inner background (creates border effect) - NOTE: Pseudo-elements don't work on input tags in some browsers, 
   so we might need a wrapper if strict border is needed. For now, using simple background. 
   Better approach for inputs: wrap in a div or use background-image tricks. 
   The spec suggests pseudo-elements but that requires a wrapper for inputs. 
   Let's assume the input itself has the background for now or use a wrapper in HTML.
*/
.omni-search::placeholder {
    color: var(--text-muted);
}

.omni-search:focus {
    background: var(--hex-blue);
    /* Brighter border on focus */
    outline: none;
}

/* --- BUTTONS --- */
.btn-hex {
    height: 40px;
    padding: 0 32px;
    background: rgba(59, 130, 246, 0.25);
    border: none;
    color: var(--hex-blue);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 50%,
            calc(100% - 15px) 100%, 15px 100%, 0 50%);
    filter: drop-shadow(0 0 1px var(--hex-blue));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-hex:hover {
    background: var(--hex-blue);
    color: white;
}

.btn-hex-secondary {
    height: 40px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 50%,
            calc(100% - 15px) 100%, 15px 100%, 0 50%);
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-hex-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* --- HEX ICONS --- */
.hex-icon-frame {
    width: 30px;
    height: 26px;
    background: rgba(59, 130, 246, 0.1);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--hex-blue);
}

/* --- ANGLED PANELS (Cards) --- */
.angled-panel {
    position: relative;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    /* Fallback */
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%, 0 20px);
    padding: 24px;
}

/* --- INPUT GROUPS --- */
.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.15);
    border: none;
    padding: 6px 16px;
    position: relative;
    transition: all 0.2s;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%,
            calc(100% - 10px) 100%, 10px 100%, 0 50%);
}

.input-group:focus-within {
    background: var(--hex-blue);
}

/* --- H3 HEXAGON GRID HELPERS --- */
.hex-row {
    display: flex;
    margin-top: -30px;
    /* Vertical overlap for tight packing */
    justify-content: center;
}

.hex-row:nth-child(even) {
    margin-left: 68px;
    /* Offset even rows by half hex width */
}

.hex-cell-wrapper {
    width: 136px;
    height: 118px;
    margin: 0 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- HWMI PROFILE MANAGER MODAL --- */
.hwmi-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--hex-blue);
    padding: 30px;
    z-index: 100;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.7), 0 0 0 1000px rgba(0,0,0,0.5); /* Overlay effect */
    /* display is managed by JS (none/block) */
    clip-path: polygon(
        20px 0, 100% 0, 
        100% calc(100% - 20px), calc(100% - 20px) 100%, 
        0 100%, 0 20px
    );
    color: var(--text-main);
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.profile-row:hover {
    background: rgba(59, 130, 246, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    justify-content: flex-end;
}